$(document).ready(function(){
    
        var container = $('div.container');
         
        // validate the form when it is submitted
        validator = $("#form1").validate({
            submitHandler: function(form) {
                form.submit();    
            },
            errorContainer: container,
            errorLabelContainer: $("ol", container),
            wrapper: 'li',
            meta: "validate",
            focusInvalid:false,
            rules: {
                 "fieldMap['name'].value":{  //待办批次
                      required: true,
                       maxlength:2000
                    }, 
                    
                "fieldMap['remarks'].value":{  //备注
                  maxlength:2000 
                }
            },
            
            messages:{
                "fieldMap['name'].value":{   //待办批次
                    required: "请填写待办批次！",
                    maxlength: "待办批次最大不能超过200个字符！"
                },
                "fieldMap['remarks'].value":{   //备注
                    maxlength: "备注最大不能超过2000个字符！"
                }
            }
        });
        });

        
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      